namespace CommontLibrary
{
    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Globalization;
    using System.Threading;
    /// <summary>
    /// Summary description for TranLanguage
    /// </summary>
    public class LoadControlUntil : System.Web.UI.Page
    {
        public LoadControlUntil()
        {
            //
            // TODO: Add constructor logic here
            //
        }

#region "Bind Control"
        public bool loadControl(Control ctTemp, string strNameControl)
        {
            try
            {
                Control ctModule = null;
                ctModule = this.LoadControl(strNameControl);
                if (ctModule != null)
                {
                    ctTemp.Controls.Add(ctModule);
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch
            {
                return false;
            }
        }
#endregion

    }
}